pokemontowerdefensefandomcom-20200215-history
Help:Move Set (Source)
This page is intended to help people familiar with Source code. Too confusing for you? Try the guide to editing the Move Set tables! Basics So, you want to put some information into some Pokémon's Move Set, eh? Intimidating code, isn't it? Well, have no fear, for all shall be revealed to you shortly. First off, let's have a look at an example table: Pretty cool, huh? Just one little problem...Tackle only has a Power of 50! If only we could start with such a good move. No problem, though! We'll just have a peek at that page and see if there's not some way to fix it... WOAH! Are you sure about this? Can't we just leave it for someone else to clean up? Alright, fine, I guess it is a lot simpler than it looks; you see, this code can be broken down into three main parts: 1. The Formatting This stuff you can pretty much ignore. This code dictates the appearance of the entire table, and hopefully there aren't any problems with that. In case you don't know, the ' ' are the actual symbols that tell the wiki where the table starts and where it ends, respectively; be careful not to delete those! Also, make sure that anything that needs to go inside the table falls between these two marks. 2. The Headers ! style="color:Silver" colspan="9"| Level Up |- ! style="color:Silver"| Lv ! style="color:Silver"| Attack Name ! style="color:Silver"| Type ! style="color:Silver"| Category ! style="color:Silver"| Power ! style="color:Silver"| Cooldown ! style="color:Silver"| Duration ! style="color:Silver"| Accuracy ! style="color:Silver"| Effect % This simpler stuff creates the headings on the table. Each !''' on a new line creates a header for a column; the '''style="color:Silver" colspan="9"| changes the text color and makes that header spread out to fit across 9 normal columns. The desired text for the heading needs to be placed after the |'''. 3. '''The Moves |- | rowspan="2" style="text-align: left; font-size: 100%;"| - | rowspan="2" style="text-align: left; font-size: 110%;"| Tackle | rowspan="2" | | rowspan="2" | | 80 | 18 | - | 100% | - |- | colspan="7" style="text-align: left; height:20px"| Here comes the uglier part. I know, I know: "All that for a single attack?!" That's just the price we have to pay for beauty. Anyways, that first mark, |-''', is used in tables to create a new line, similar to how you use the Return/Enter key to go to the next line while typing. Unless the move comes at the end of the table, each move should have one of these before and after it to separate it from the other moves. I'm not going to bother getting into all the formatting on the first few lines; all you should realize is that the '''rowspan="2" makes these cells take up double the height of the information on the right, thus saving space horizontally. Without labels, this may seem a bit intimidating, but matching the space to the column header simplifies things. This pattern may be memorized or referred to as many times as needed: |- | rowspan="2" style="text-align: left; font-size: 100%;"| Lv | rowspan="2" style="text-align: left; font-size: 110%;"| Attack Name | rowspan="2" |Type | rowspan="2" |Category | Power | Cooldown | Duration | Accuracy | Effect % |- | colspan="7" style="text-align: left; height:20px"|Notes Looks much simpler now. All that's left is to stick the right information in the right space. If there is nothing to put in a cell (e.g. the move has no Duration, there is no extra effect) then the norm is to replace the content with a "'-'"; HOWEVER, beware of the space! A blank cell needs to be shown as | -'. If you forget the space, '|-''' is the symbol that cues the table to move on to the next line! You can always check for errors using the Preview button before you publish. Solution In all that mess, I almost forgot about the error in Tackle's Power! Let's see if we've learned something from all this. Here is the source code for that table again: Now, let's see...the error occured in the Power section of Tackle; this means we only have to look at the move part of the code. If we remember the layout of the move code: |- | rowspan="2" style="text-align: left; font-size: 100%;"| Lv | rowspan="2" style="text-align: left; font-size: 110%;"| Attack Name | rowspan="2" |Type | rowspan="2" |Category | Power | Cooldown | Duration | Accuracy | Effect % |- | colspan="7" style="text-align: left; height:20px"|Notes then we should find the error right....here! | rowspan="2" | | 80 | 18 There it is! That 80 must be the culprit! Tackle only has a Power of 50, ya darned varmint! Now we just need to change that one little number so that the code looks like this: Voilà! Error corrected! After hitting Preview to make sure we didn't inadvertently turn the table into a three-headed fire-breathing dragon, we see that our table now looks like this: MUAHAHA! VILE TACKLE DEMON, YOU HAVE BEEN VANQUISHED! However, most problems you might run across will not be in such small amounts of code... A Real Move Set Table In the real editing world, you will run across larger deposits of code. For instance, let's take a peek at the code for Eevee's Move Set table: Move Set ...yeesh. A looooooot of stuff there... Well, no problem, I guess. To find what you are looking for, you can always search for the Attack Name with the Find on Page function of your browser (i.e. ctrl + F, for some of us). Then, as long as you follow the preexisting format, your edit should come out fine. Also, remember to include '''TM or HM in the Level column if you edit the bottom half! A couple notes on the image code: Image Code #The ' ' is what creates the Poison-type image, . For moves of a different type, all you need to change is the Poison to another type. #Same goes for ' '. There are three possibilities for the file name: Other.png, Special.png, and Physical.png. #'75px' determines the size of the picture in pixels. Changing this number will alter the size of the image, but you need the px after the number as well. Happy editing! ---- This is a guide intended to help editors navigate the new (as of April 2012) layouts for the Move Set tables used across this wiki, written by RyanTeapot. If you have any further questions, please contact him for support.